<?php
Yii::import('zii.widgets.CPortlet');

class RightBar extends CPortlet
{
    protected function renderContent(){        
        $controller = Yii::app()->controller->id;
        $data_group = array();
        $data_member = array();   
        $data_grade = array();   
        $data_subject = array();   
        if($controller == "group"){
            $group_id = intval($_GET["group_id"]);
            $data_group = Group::getRowById($group_id);            
            $data_member = Member::getRowByGroupID($group_id);
            $data_grade = Grade::getAllRows();
            $data_subject = Subject::getAllRows();        
        }                                   
        $this->render("right_bar",array("data_group"=>$data_group,"data_member"=>$data_member,"data_grade"=>$data_grade,"data_subject"=>$data_subject));         
    }
}